<?php
/**
 * CreateTime: 2023/11/15 10:17
 * User:LinQ
 */
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('role_auth', function (Blueprint $table) {
            // 数据库基本配置
            $table->engine = 'InnoDB';
            // 数据库字段
            $table->id('role_auth_id')->comment("权限角色id");
            $table->integer('role_id')->nullable(false)->comment("角色id");
            $table->integer('auth_id')->nullable(false)->comment("权限id");
            $table->integer('auth_value')->nullable(false)->comment("基础权限值 1读 2写 4修改 8删除 ");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
};
